from tkinter import*
x = int(input())
y = int(input())
m = int(input())
coords = [x, y, 10 * m + x, y, 10 * m + x, 10 * m + y, 20 * m + x, 10 * m + y, 20 * m + x, 30 * m + y, 10 * m + x, 30 * m + y, 10 * m + x, 20 * m + y, x, 20 * m + y, x, y]

if m == 0 and x >= 0 and x <= 500 and y >= 0 and y <= 500:
    pass
else:
    if m > 0 and 0 * m + x >= 0 and 0 * m + y >= 0  and 20 * m + x <= 500 and 20 * m + y <= 500:
        pass
    else:
        if m < 0 and 20 * m + x >= 0 and 20 * m + y >= 0  and 0 * m + x <= 500 and 0 * m + y <= 500:
            pass
        else:
            print("Размер фигуры превышает максимальный размер поля")
            exit()

root = Tk()
root.title("ИТ марафон")
root.geometry('500x500')
canvas = Canvas(bg = "white" , width = 500 , height = 500)
canvas.pack(anchor = CENTER , expand = 1)
canvas.create_polygon(coords)


root.mainloop()
